3.207 \(\int \frac{\tan ^2(e+f x)}{(a+a \sec (e+f x))^{9/2}} \, dx\)

Optimal. Leaf size=177 \[ -\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{a^{9/2} f}+\frac{91 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{32 \sqrt{2} a^{9/2} f}+\frac{27 \tan (e+f x)}{32 a^3 f (a \sec (e+f x)+a)^{3/2}}+\frac{11 \tan (e+f x)}{24 a^2 f (a \sec (e+f x)+a)^{5/2}}+\frac{\tan (e+f x)}{3 a f (a \sec (e+f x)+a)^{7/2}} \]

[Out]

(-2*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(a^(9/2)*f) + (91*ArcTan[(Sqrt[a]*Tan[e + f*x])/(
Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(32*Sqrt[2]*a^(9/2)*f) + Tan[e + f*x]/(3*a*f*(a + a*Sec[e + f*x])^(7/2)) +
 (11*Tan[e + f*x])/(24*a^2*f*(a + a*Sec[e + f*x])^(5/2)) + (27*Tan[e + f*x])/(32*a^3*f*(a + a*Sec[e + f*x])^(3
/2))

________________________________________________________________________________________

Rubi [A]  time = 0.1795, antiderivative size = 227, normalized size of antiderivative = 1.28, number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {3887, 471, 527, 522, 203} \[ \frac{27 \sin (e+f x) \sec ^2\left (\frac{1}{2} (e+f x)\right )}{64 a^4 f \sqrt{a \sec (e+f x)+a}}-\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{a^{9/2} f}+\frac{91 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{32 \sqrt{2} a^{9/2} f}+\frac{\sin (e+f x) \cos ^2(e+f x) \sec ^6\left (\frac{1}{2} (e+f x)\right )}{24 a^4 f \sqrt{a \sec (e+f x)+a}}+\frac{11 \sin (e+f x) \cos (e+f x) \sec ^4\left (\frac{1}{2} (e+f x)\right )}{96 a^4 f \sqrt{a \sec (e+f x)+a}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^2/(a + a*Sec[e + f*x])^(9/2),x]

[Out]

(-2*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(a^(9/2)*f) + (91*ArcTan[(Sqrt[a]*Tan[e + f*x])/(
Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(32*Sqrt[2]*a^(9/2)*f) + (27*Sec[(e + f*x)/2]^2*Sin[e + f*x])/(64*a^4*f*Sq
rt[a + a*Sec[e + f*x]]) + (11*Cos[e + f*x]*Sec[(e + f*x)/2]^4*Sin[e + f*x])/(96*a^4*f*Sqrt[a + a*Sec[e + f*x]]
) + (Cos[e + f*x]^2*Sec[(e + f*x)/2]^6*Sin[e + f*x])/(24*a^4*f*Sqrt[a + a*Sec[e + f*x]])

Rule 3887

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[(-2*a^(m/2 +
 n + 1/2))/d, Subst[Int[(x^m*(2 + a*x^2)^(m/2 + n - 1/2))/(1 + a*x^2), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 471

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(e^(n -
1)*(e*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(n*(b*c - a*d)*(p + 1)), x] - Dist[e^n/(n*(b*c -
 a*d)*(p + 1)), Int[(e*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(m - n + 1) + d*(m + n*(p + q + 1)
+ 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1] && GeQ[n
, m - n + 1] && GtQ[m - n + 1, 0] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\tan ^2(e+f x)}{(a+a \sec (e+f x))^{9/2}} \, dx &=-\frac{2 \operatorname{Subst}\left (\int \frac{x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )^4} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a^3 f}\\ &=\frac{\cos ^2(e+f x) \sec ^6\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{24 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{\operatorname{Subst}\left (\int \frac{1-5 a x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )^3} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{3 a^4 f}\\ &=\frac{11 \cos (e+f x) \sec ^4\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{96 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{\cos ^2(e+f x) \sec ^6\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{24 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{\operatorname{Subst}\left (\int \frac{15 a-33 a^2 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{24 a^5 f}\\ &=\frac{27 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{64 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{11 \cos (e+f x) \sec ^4\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{96 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{\cos ^2(e+f x) \sec ^6\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{24 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{\operatorname{Subst}\left (\int \frac{111 a^2-81 a^3 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{96 a^6 f}\\ &=\frac{27 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{64 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{11 \cos (e+f x) \sec ^4\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{96 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{\cos ^2(e+f x) \sec ^6\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{24 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{2 \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a^4 f}-\frac{91 \operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{32 a^4 f}\\ &=-\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a^{9/2} f}+\frac{91 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)}}\right )}{32 \sqrt{2} a^{9/2} f}+\frac{27 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{64 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{11 \cos (e+f x) \sec ^4\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{96 a^4 f \sqrt{a+a \sec (e+f x)}}+\frac{\cos ^2(e+f x) \sec ^6\left (\frac{1}{2} (e+f x)\right ) \sin (e+f x)}{24 a^4 f \sqrt{a+a \sec (e+f x)}}\\ \end{align*}

Mathematica [C]  time = 23.6379, size = 5594, normalized size = 31.6 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Tan[e + f*x]^2/(a + a*Sec[e + f*x])^(9/2),x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [B]  time = 0.212, size = 724, normalized size = 4.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^2/(a+a*sec(f*x+e))^(9/2),x)

[Out]

-1/192/f/a^5*(192*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*cos(f*x+e)^4*sin(f*x+e)*2^(1/2)*arctanh(1/2*2^(1/2)*(-2
*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))+273*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*cos(f*x+e)^4
*sin(f*x+e)*ln(-(-(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)+cos(f*x+e)-1)/sin(f*x+e))+384*2^(1/2)*cos(f*
x+e)^3*sin(f*x+e)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2
)*sin(f*x+e)/cos(f*x+e))+546*cos(f*x+e)^3*sin(f*x+e)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*ln(-(-(-2*cos(f*x+e)
/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)+cos(f*x+e)-1)/sin(f*x+e))-384*2^(1/2)*cos(f*x+e)*sin(f*x+e)*(-2*cos(f*x+e)/(
1+cos(f*x+e)))^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))-314*cos(f
*x+e)^5-546*cos(f*x+e)*sin(f*x+e)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*ln(-(-(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1
/2)*sin(f*x+e)+cos(f*x+e)-1)/sin(f*x+e))-192*2^(1/2)*sin(f*x+e)*arctanh(1/2*2^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+
e)))^(1/2)*sin(f*x+e)/cos(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)+216*cos(f*x+e)^4-273*sin(f*x+e)*ln(-(-(
-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)+cos(f*x+e)-1)/sin(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)+
348*cos(f*x+e)^3-88*cos(f*x+e)^2-162*cos(f*x+e))*(1/cos(f*x+e)*a*(1+cos(f*x+e)))^(1/2)/sin(f*x+e)^3/(1+cos(f*x
+e))^2

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+a*sec(f*x+e))^(9/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [A]  time = 3.59174, size = 1802, normalized size = 10.18 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+a*sec(f*x+e))^(9/2),x, algorithm="fricas")

[Out]

[-1/384*(273*sqrt(2)*(cos(f*x + e)^4 + 4*cos(f*x + e)^3 + 6*cos(f*x + e)^2 + 4*cos(f*x + e) + 1)*sqrt(-a)*log(
(2*sqrt(2)*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + 3*a*cos(f*x + e)^2 + 2
*a*cos(f*x + e) - a)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1)) + 384*(cos(f*x + e)^4 + 4*cos(f*x + e)^3 + 6*cos(f
*x + e)^2 + 4*cos(f*x + e) + 1)*sqrt(-a)*log((2*a*cos(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*
x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 4*(157*cos(f*x + e)^3 + 206*cos(
f*x + e)^2 + 81*cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))/(a^5*f*cos(f*x + e)^4 + 4*
a^5*f*cos(f*x + e)^3 + 6*a^5*f*cos(f*x + e)^2 + 4*a^5*f*cos(f*x + e) + a^5*f), -1/192*(273*sqrt(2)*(cos(f*x +
e)^4 + 4*cos(f*x + e)^3 + 6*cos(f*x + e)^2 + 4*cos(f*x + e) + 1)*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(f*x + e) +
 a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) - 384*(cos(f*x + e)^4 + 4*cos(f*x + e)^3 + 6*cos(f*x +
e)^2 + 4*cos(f*x + e) + 1)*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*
x + e))) - 2*(157*cos(f*x + e)^3 + 206*cos(f*x + e)^2 + 81*cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e
))*sin(f*x + e))/(a^5*f*cos(f*x + e)^4 + 4*a^5*f*cos(f*x + e)^3 + 6*a^5*f*cos(f*x + e)^2 + 4*a^5*f*cos(f*x + e
) + a^5*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**2/(a+a*sec(f*x+e))**(9/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+a*sec(f*x+e))^(9/2),x, algorithm="giac")

[Out]

Timed out